//
//  ChatViewController.m
//  PhotographyStudi
//
//  Created by 一枫 on 2017/8/5.
//  Copyright © 2017年 叶一枫. All rights reserved.
//

#import "ChatViewController.h"

@interface ChatViewController ()

@end

@implementation ChatViewController

- (void)viewDidLoad {
    [super viewDidLoad];

//    BackView *backView = [[BackView alloc]initBackViewWithTitle:@"返回" image:@"" tag:0];
//    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:backView];
//    backView.clickBlock = ^(NSInteger tag) {
//        [self.navigationController popToRootViewControllerAnimated:YES];
//    };
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"设置" style:UIBarButtonItemStylePlain target:self action:@selector(setting)];
}

-(void)setting{
    RYSettingViewController *settingVC = [[RYSettingViewController alloc]init];
    settingVC.conversationType = self.conversationType;
    settingVC.targetId = self.targetId;
    settingVC.clearHistoryCompletion = ^(BOOL isSuccess) {
        [self.conversationMessageCollectionView reloadData];
    };
    [self.navigationController pushViewController:settingVC animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
